import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *


class Winform(QWidget):
    def __init__(self, parent=None):
        super(Winform, self).__init__(parent)
        self.setWindowTitle('Form')
        self.resize(400, 100)

        formlayer = QFormLayout()
        label1 = QLabel('label1')
        lineEdit1 = QLineEdit()
        label2 = QLabel('label2')
        lineEdit2 = QLineEdit()
        label3 = QLabel('label3')
        lineEdit3 = QLineEdit()

        formlayer.addRow(label1, lineEdit1)
        formlayer.addRow(label2, lineEdit2)
        formlayer.addRow(label3, lineEdit3)

        self.setLayout(formlayer)


if __name__ == '__main__':
    app = QApplication(sys.argv)
    combox = Winform()
    combox.show()
    sys.exit(app.exec_())
